package gw.com.android.ui.trade.Fragment;

import android.view.View;

import com.gwtsz.gts2.hx.R;

import gw.com.android.app.ActivityManager;
import gw.com.android.app.GTConfig;
import gw.com.android.model.ConfigType;
import gw.com.android.ui.views.CommonTitleBar;
import www.com.library.app.PushMsgTabFragment;
import www.com.library.util.CommonUtils;

/**
 * 未登陆时，交易tab显示的fragment
 *
 * @author jett
 * @since 2017-07-28.
 */
public class LoginGuideFragment extends PushMsgTabFragment {

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_login_guide;
    }

    @Override
    protected void initLayoutView() {
        CommonTitleBar titleBar = (CommonTitleBar) mRootView.findViewById(R.id.common_title_bar);
        titleBar.setLeftIcon(0);
        titleBar.setAppTitle(R.string.main_menu_item_trade);
        mRootView.findViewById(R.id.btn_to_login).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                GTConfig.instance().setAccountType(GTConfig.ACC_TYPE_REAL);
                ActivityManager.backLogin(getActivity(), false);
            }
        });
        mRootView.findViewById(R.id.tv_trade_open_account).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (CommonUtils.isFastDoubleClick()) {
                    return;
                }
                ActivityManager.showOpenAccount(getActivity(), ConfigType.ADD_LOGIN_REAL_TAG);
            }
        });
    }

    @Override
    protected void initViewData() {

    }

}
